<?php

namespace app\api\controller;

use think\Controller;
use think\Request;
use think\Config;

class Base extends Controller
{
    // 每页条数
    protected $number;

    public function _initialize(Request $request = null)
    {
        parent::_initialize($request);
        $this->number = request()->param('number') ?: Config::get('paginate')['list_rows'];

        //pc端访问直接返回404，上线后去掉注释
     //    if (!isset ($_SERVER['HTTP_X_WAP_PROFILE'])){  
	    //     $res = array(
     //            'code' => 404,
     //            'message' => 'No page can be found',
     //            'data' => []
     //        );
     //        echo json_encode($res, true);
     //        exit;
	    // }
    }
}
